package daoImpl;

import java.util.ArrayList;
import java.util.List;
import java.util.Observable;

import dao.TransactionDao;

import model.Transaction;


public class TransactionDaoImpl extends Observable implements TransactionDao{
	
	public List<Transaction>	transactions	= new ArrayList<Transaction>();
	
	
	public void add( Transaction transaction ) {
		transactions.add( transaction );
		setChanged();
		notifyObservers();
	}
	
	
	public void delete( Transaction transaction ) {
		transactions.remove( transaction );
	}
	
	
	public void update( Transaction transaction ) {
	}


	public List<Transaction> getTransactions() {
		return transactions;
	}


	public void setMemento( List<Transaction> trans ) {
		this.transactions = trans;
	}
}
